<?php
############################| Url Route Request 配置 ############################

return [
    /**
     * url模式:
     * 1 Pathinfo                          ...xx.com/index.php/port/edit/id/34
     * 2 Redirect (需开启对应 Apache/nginx 模块,对应配置) ...xx.com/port/edit/id/34
     * 3 Compat 兼容模式                           ...xx.com/index.php?r=port/edit/id/34
     * 4 Default 默认get方式                        ...xx.com/index.php?c=port&a=edit&id=34
     */
    'format'          => 1
    ,'route_var'      =>'r'  #兼容模式获取路由信息的GET变量，e.g. index.php?r=/controller/action/id/1 后面的参数取决于separator
    ,'suffix'        =>'html' #路由伪静态后缀名

    // 启用路由规则匹配
    ,'enabledRule'      => false
    /**
     * route rules
     */
    ,'filter_keywords'     => ['xxx','yyy']
    //@see ulue\core\bin\Router::ruleKeywords()
    ,'rule_keywords'     => [
        //'<@year>'  => '<year:\d{1,4}>',
    ]
    ,'rules'            => [
        #   'request url'           => 'real url'
        #   # group/module/controller/action/<id:\d+>' => '<controller>/<action >',
        #     '<g:\w+>/<m:\w+>/<c:\w+>/<a:\w+>/<id:\d+>' => '<c:\w+>/<a:\w+>',
        #     '<m:\w+>/<c:\w+>/<a:\w+>/<id:\d+>' => '<c:\w+>/<a:\w+>',
        /**
         * 全部请求都定向到 '/c/index/a/about'
         */
        // '<@ALL_MATCH>'     => '<c:index>/<a:about>',

        // '<c:default>/<a:\w+>'     => '<c:index>/<a:\w+>',
        /**
         * 模块 post 下面的所有请求都会定向到 /index/global
         * @example  http://xxx.com/[post/manage]   -> http://xxx.com/[index/globalpanel]
         */
        //'<m:post>/<c:\w{2,12}>'     => '<c:index>/<a:global>',
        /**
         * 模块 post 下面的所有请求都会定向到 /index/@a [indexController下的同名方法]
         * @example  http://xxx.com/post/manage/[add]   -> http://xxx.com/index/[add]
         */
        // '<m:post>/<c:\w{2,12}>/<a:\w{2,12}>'     => '<c:index>/<a:@a>',
        //'<category:\w+>/<id:\d+>' => '<c:post>/<a:index>/category/<category>/id/<id>',
        //'<category:\w+>/<year>/<month>/<day>' => '<c:post>/<a:archive>/category/<category>/time/<year>-<month>-<day>',
        # /[test-page.html]               -->   /?[c=post&a=index&title=test-page]
        //'<title:\w{1,12}(?:-\w{1,12}){0,15}(?:\.html)? >' => '<m:post>/<c:manage>/<a:index>/title/<title>',
    ]
];